<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
    <style>
    #parent{
        margin:100px;
        width:100px;
        height:100px;
        border:5px solid #333;
        padding:20px;
    }
    </style>
</head>
<body>
    <div id="parent"></div>
    <script>
        /* jquery
           append,prepend,before,after
         */
        /* 如何将jquery对象转为javascript对象
        $("#parent")[0]
        $("parent").get(0)
        width--只有width
        innerWidth()-->width,padding-->clientWidth
        outerWidth()-->width,padding,border-->offsetWidth
         */
    $(function(){
        // $("#parent").append("<p>hello world </p>")
        var width=$("#parent").outerWidth();
        console.log(width)
    })
    </script>
</body>
</html>